package com.zhongfl.crm.lixiao.batch.jobs;

import com.zhongfl.crm.lixiao.batch.service.OrderRevisitLogSyncFromLX2BossService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * LXRevisitLogJob 励销跟进记录同步任务
 *
 * @author tiantian
 * @date 2018/6/27 16:23
 */
@Component
@Slf4j
public class OrderRevisitLogSyncFromLX2BossJob extends JobService {


    @Resource
    private OrderRevisitLogSyncFromLX2BossService orderRevisitLogSyncFromLX2BossService;
    @Override
    public boolean lock() {
        return true;
    }

    @Override
    public void start() throws Exception {

        log.info("交付订单 励销跟进记录 同步服务开始");
        orderRevisitLogSyncFromLX2BossService.syncRevisitLog("opportunity",false);
        log.info("交付订单 励销跟进记录 同步服务结束！！！");

        log.info("批贷订单 励销跟进记录 同步服务开始");
        orderRevisitLogSyncFromLX2BossService.syncRevisitLog("contract",false);
        log.info("批贷订单 励销跟进记录 同步服务结束！！！");
//
//        log.info("发送邮件开始");
//        lxRevisitLogSyncService.sendNotifyMail();
//        log.info("发送邮件完成！！！");
    }

}
